/* 测试一下信号捕捉
 *
*/
#include <iostream>
#include <signal.h>
#include <unistd.h>
using namespace std;
void signalHaddle(int sig)
{
    cout << "the signal is " << sig << endl;
}

int main(int argc, char *argv[])
{
    signal(SIGHUP, signalHaddle);
    signal(SIGQUIT, signalHaddle);
    signal(SIGINT, signalHaddle);
    pause();
    return 0;
}
